import http from "@/api/axios";

export const getListApi = (data: Carrier.SearchForm) => {
  return http({
    method: "post",
    url: "/base/biz/carrier/queryPage",
    data
  });
};

export const deleteApi = (data: { id: string }) => {
  return http({
    method: "delete",
    url: "/base/biz/carrier/deleteById",
    data
  });
};

export const addCarrierApi = (data: Carrier.AddForm) => {
  return http({
    method: "post",
    url: "/base/biz/carrier/add",
    data
  });
};

export const editCarrierApi = (data: Carrier.editForm) => {
  return http({
    method: "post",
    url: "/base/biz/carrier/edit",
    data
  });
};

//导入运输商
export const importCarrierApi = (data: FormData) => {
  return http({
    method: "post",
    url: "/base/biz/carrier/importCarrier",
    data,
    headers: {
      "Content-type": "multipart/form-data"
    }
  });
};
